#include "stdafx.h"

StatusBar::StatusBar()
{
	border = ImageMgr::getInstance()->get("image/statusBar/hp_bar.png");
	HPImg = ImageMgr::getInstance()->get("image/statusBar/heroHP.png");
	manaImg = ImageMgr::getInstance()->get("image/statusBar/heroMana.png");
}

StatusBar::~StatusBar()
{
}

bool StatusBar::render()
{
	HPImg->render(x + left, y + top, HP / maxHP * width, 60);
	manaImg->render(x + left, y + distance + top, mana / maxMana * width, 60);

	border->render(x, y);
	border->render(x, y + distance);

	return true;
}